﻿using Pattern23责任链模式.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern23责任链模式.Models
{
    public class VicePresident : HandlerBase
    {
        public override void Approve(Order order)
        {
            if (order == null)
            {
                throw new ArgumentNullException("订单不能为空！");
            }

            if (order.Amount <= 50000)
            {
                Console.WriteLine($"{order.Name}的订单为{order.Amount}，副总裁审核即可");
            }
            else
            {
                Console.WriteLine("大于5万，需找CEO审核...");
            }
        }
    }
}
